﻿@model System.Data.DataTable
<form id="form1" method="post" action="/MyTest/SaveMyCustomForm">
    <table cellpadding="0" cellspacing="1" border="0" width="99%" class="formtable">
        <tr>
            <th style="width: 80px;">名称：</th>
            <td><input type="text" name="Title" class="mytext" value="@(Model.Rows.Count>0?Model.Rows[0]["f1"].ToString():"")" validate="empty" errmsg="标题不能为空!" style="width: 75%" /></td>
        </tr>
        <tr>
            <th>内容：</th>
            <td><textarea class="mytextarea" name="Contents" id="Contents" model="html" validate="editor" errmsg="内容不能为空!" style="width: 75%;height:80px;">@(Model.Rows.Count>0?Model.Rows[0]["f2"].ToString():"")</textarea></td>
        </tr>
    </table>
</form>
<script src="~/RoadFlowResources/scripts/ckeditor/ckeditor.js"></script>
<script src="~/RoadFlowResources/scripts/flowRun/form.js"></script>
<script>
    $(function () {
        var editor = CKEDITOR.replace("Contents", {
            height: 300,
            toolbarGroups: formLoad.ckeditor_toolbarFullGroups,
            filebrowserImageUploadUrl: '/RoadFlowCore/Controls/SaveCKEditorFiles'
        });
    });
    CKEDITOR.on('instanceReady', function (e) {
        parent.setIframeHeight();
    });
</script>